import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询应急通讯录列表
export function getAddressBookList(data,query) {
  return request({
    url: '/bussiness/ADDRESSBOOK/list',
    method: 'post',
    params: query,
    data: data,
    isEncrypt: false
  })
}

// 查询应急通讯录详情
export function getAddressBookInfo(id) {
  return request({
    url: '/bussiness/ADDRESSBOOK/info?id=' + id,
    method: 'get',
  })
}

// 新增应急通讯录
export function createAddressBook(data) {
  return request({
    url: '/bussiness/ADDRESSBOOK/add',
    method: 'post',
    data: data,
    isEncrypt: false
  })
}

// 修改应急通讯录
export function editAddressBook(data) {
  return request({
    url: '/bussiness/ADDRESSBOOK/edit',
    method: 'post',
    data: data,
    isEncrypt: false
  })
}

// 删除应急通讯录
export function deleteAddressBook(bookId) {
  return request({
    url: '/bussiness/ADDRESSBOOK/remove?ids=' + bookId,
    method: 'post',
    isEncrypt: false
  })
}
